home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 017 (1988-06)(Swedish User Group of Amiga)(SE)(PD)[m doscopy][WB].zip
/
Camelot 017 (1988-06)(Swedish User Group of Amiga)(SE)(PD)[m doscopy][WB].adf
/
JoBS
/
JOBS.DOC
< prev
next >
Wrap
Text File
|
1988-06-08
|
15KB
|
352 lines
CB N EG
/*** JoBS program ***/
This is ShareWare: use it, copy it, or send it to another BBS.
----------------------------------------------------------------------
WHAT IS JoBS ?
The program provides instant access to various WorkBench and CLI
commands by simply selecting command gadgets. The user can define
upto 280 commands and assign them to command gadgets. JoBS also
provides the built-in capabilities of several CLI commands. (CD,
LIST, COPY, RENAME, MAKEDIR, DELETE, and some others).
JoBS allows the user to invoke most CLI programs or WB commands by
simply selecting the displayed program name with the mouse then
selecting the "Run" gadget.
Moreover, filenames can be selected as input or output for other
programs. For example, selecting files to edit, files to arc,
IFF-pictures to display, music to play, basic programs to run,
spreadsheets or databases to open, games to play, etc...
----------------------------------------------------------------------
HOW TO INSTALL JoBS ?
(1) Automatic-Startup Method (Recommended for 512K or more)
Copy JoBS c:
Copy JoBS.def s:
Your-Favorite-Editor s:startup-sequence
(add the following commands before or instead of LoadWB)
run JoBS s:JoBS.Def
wait 2
(remove the following command)
EndCLI
Reboot (Ctl-Amiga-Amiga)
Now, you get JoBS every time you power-on, the CLI window will stay
active, and you can drag the CLI resizing gadget left to expose the
Workbench screen, if you really need it.
(2) CLI Method - Option A
Copy JoBS c:
Copy JoBS.def s:
Run JoBS
(3) CLI Method - Option B
Copy JoBS and JoBS.Def to the same directory on any disk.
Change to that directory (eg: CD df1:JoBSdir )
Run JoBS
(4) CLI Method - Option C
Copy JoBS and JoBS.Def to the same directory on any disk.
Run df1:JoBSdir/JoBS df1:JoBSdir/JoBS.Def
(5) Workbench Method (Not recommended at all)
Copy JoBS, JoBS.Def, and JoBS.info to the same directory on any disk.
Double-click the JoBS icon.
JoBS.info is not required unless you use this method. JoBS uses the
CLI window for some user-defined commands like DME, so this
method will limit JoBS capabilities.
----------------------------------------------------------------------
JoBS BUILT-IN FUNCTIONS
The "Dir>" text field shows name of the current directory. When the
text in this gadget is modified and entered, JoBS will try to change
to that directory and display those filenames.
The "Pat>" text field is used to display filenames given some pattern
and wildcard characters. The '*' matches anything and '?' matches any
single character. For example, to show all icon files select the
"Pat>" text field and enter "*.info". Pattern requests do not change
the current directory and accumluate in the file list. One possible
application for this allows comparing the filenames for two or more
directories. File-sizes and file-times are not displayed so that the
full directory-path and file name can be displayed.
The "Use>" text field is a general purpose input gadget, and may be
used to enter a new sub-directory name, or an entire CLI command.
Small gadgets with the names of frequently used disk-drives and other
ram-disks are available for both "Dir>" and "Use>", these gadgets are
user definable within the JoBS.def file.
The filenames in the current directory are displayed on the left side
of the screen. There are three ways to scroll the filenames: (1) use
the sliding gadget for scrolling large jumps , (2) use the up and down
gadgets to scroll 1 filename at a time, or (3) use the up and down
arrow keys that scroll 3 filenames at a time.
The window of filenames also shows the number of days since the file
was modified, the time it was modified, and the file size.
To the right of the filenames, the column of small integer numbers
will indicate how many days since the file has been copied or
modified. This is great if you have a clock or always set the time.
I picked this format because its concise, easy and fast to compute.
The next column is the time of day that each file was copied or
modified, as hours:minutes. This is handy for your current session.
Also, directory names will show the last time that any file within
the directory was modified.
The last column is the size of the file. The units are in "Bytes" or
"Blocks" depending on the label of the corresponding command gadget in
the top-right group. The small box at the bottom of this column shows
the total size of all files selected. This is handy in several ways:
(1) see if the selected files will fit on another disk before copying,
(2) see the progress of JoBS as files are processed the filenames are
deselected and the total size of remaining files reduce to zero,
(3) sometimes, especially when deleting files it is nice to know that
the filename selected is the only file selected - the file size should
match the total filesize displayed.
The top-right group of gadgets includes another one called "Sort" that
will sort the filename alphabetically, or by time, or by file size.
The time sort will show most recently changed/copied files first.
The size sort will show the largest files (usually programs) first.
The command gadget "Confirm" or "Bypass" acts like a switch. Either
allowing confirmation before a command is executed or bypassing.
This command can also be invoked by pressing the right mouse button.
"Bypass" is much faster, but be careful which gadget you select !!!
To enter into a directory in the filename list, just select the
directory name. To back-out of a directory select "Parent".
"All" will toggle select/deselect all filenames.
"Select" will copy a selected filename to the "Use>" field, or copy
the current directory name if there isn't a filename selected.
"Clear" will first deselect any selected filenames. "Clear" again
will erase any text from the "Use>" field.
Tasks can be run as a "SubTask", or invoked as "OneTask" that run
without inter-task contention by using this top-right command gadget.
"SubTask" simply runs each request as a separate task. "OneTask"
stacks up the requests one-after-the-other; more on this later.
Files can be copied from the current directory by selecting the
filenames and entering the name of some other disk or directory into
the "Use>" field, then select "Copy" command from the top-right group.
Note, this built-in command will not copy and rename a file back into
the current directory, like AmigaDOS COPY. For that, simply pick the
user command gadget that invokes the AmigaDOS COPY command instead.
A filename can be renamed by selecting the filename and entering the
new filename into the "Use>" field, then select the "Rename" command.
There is no real difference between this built-in command and the
corresponding AmigaDOS RENAME user command.
Selected files can be deleted using the "Delete" command gadget.
The "Use>" field can alternately be used for a filename to delete.
"Del-Dir" removes the current empty directory. If the directory files
need to be erased select "All" then "Delete".
"MakeDir" creates a new directory within the current directory using
the name given in the "Use>" field.
JoBS displays 40 command gadgets on the right side of the screen.
Each of the bottom 28 command gadgets can scroll through 10 different
user command definitions. There are two ways to scroll the user
command gadgets: (1) use the up and down gadgets to scroll one page
at a time, or (2) press a number on the keyboard (1=page-1,
2=page-2,... 9=page-9, 0=page-10).
---------------------------------------------------------------------
JoBS USER COMMANDS
There is one main caveat for all prospective user commands which only
involves those programs that use a CLI window for some additional user
input. Programs (like DIR OPT I) that will prompt the user for
various keyboard interactions will not work the same. Most programs
use their own windows for user interaction which works fine.
A simple work-around exists for most CLI window input(s). You can
avoid the CLI window input problem by redirecting user input to come
from a <file instead. For example: user response to enter y/n in
order to confirm a screen dump, or some script of several user
responses can be saved in a file and defined within the user command
gadget (see JoBS.Def for details).
The "Use>CLI" user command gadget simply invokes whatever command
statement is currently given in the "Use>" field. This has some
advantanges over the straight CLI window, because statements in the
"Use>" field can be modified or reused, and misspellings can be easily
corrected without retyping, also filenames can be copied to "Use>".
To run a program in the current directory, just select the program
name then select the "Run" user command gadget.
The "Parms" command gadget is used to invoke a command in the "Use>"
field and pass the selected filenames as parameters. This is one of
the most general purpose command gadgets. Put the name (including
path if required) of some program into the "Use>" field (like:
AmigaBasic, MaxiPlan, DME, Blitz, Execute, uShow, UnArc, Make, MFF,
Scribble!,...you get the idea). Then select any filename(s) you want
to process with the "Use>" command. If you want to select more than
one filename, first check the state of the "SubTask"/"OneTask" gadget.
"OneTask" will stack-up the process requests, one after the other.
"SubTask" uses multi-tasking do everything pseudo-simultaneously.
"Execute" will execute a selected command (aka Script) filename.
---------------------------------------------------------------------
HOW TO CUSTOMIZE JoBS USER COMMANDS ?
JoBS.def defines all 280 user command gadgets, descriptions for each
of the 10 pages of user commands, and the default storage devices.
JoBS automatically reads JoBS.def when the program starts.
Even after JoBS has started, the user can select a definition file
then the "Define" command gadget. All the gadgets will be redefined.
Look at the sample JoBS.def file. The file should have 291 records.
The user can add new commands or redefine any of the command gadgets.
The first record defines the 5 storage devices. Each device name has
upto 4 characters. These names are used to control "Dir>" & "Use>".
vd0: df0: df1: df2: ram:
The next 10 records of the JoBS.def file are short descriptions for
each page of user command gadgets. Each page contains 28 gadget
definitions so its useful to group them in some way. The descriptions
are displayed in the message window when scrolling command gadgets.
The next 280 records define each user command gadget.
There are basically 3 fields in each record:
(1) the gadget label, (2) the controls, (3) the format statement
The gadget label can be anything, upto 7 chars, no imbedded blanks.
Blank space is used to separate each field.
The controls field has upto 3 control characters defined as follows:
You have a two choices for the first control character:
(1) '?' means confirm the user command before execution
(2) '-' means dash right into the command without confirmation
Note: your choice of "Confirm" or "Bypass" will override.
You have three choices for the second control character:
(1) '!' means that if several filenames are selected as "OneTask"
the sequence will run uninterrupted by mouse-button selections.
(2) '-' means stop the current process by using the mouse-button.
(3) ' ' means take the default values for the second and third
control characters.
You have three choices for the third control character:
(1) ':' means that after a command executes in "OneTask" mode,
refresh the directory list to see any new or changed filenames.
(2) '-' means after the command do not refresh directory list.
(3) ' ' means take the default value '-'
The format statement field a little more complex to explain, but its
really easy to use.
The format can be upto 72-characters with imbedded blanks.
The characters "%s" are used to substitute parameters:
"%s" transfers all characters as required
"%0.0s" transfers zero characters (used to ignore parameters)
"%4.4s" transfers exactly four characters (ie. "df1:")
This syntax is used in the "C" language for building a text string
from several variables. For those who care:
/********************************************************************/
sprintf(command,&But_cmd[gadgid][0],Task,filename,Use_buf,filename,Use_buf);
if(But_req[gadgid][0]=='?')
{
sprintf(Prompt_buf,"Confirm Control Button:");
sprintf(Yes_buf,"%s",command);
sprintf(No_buf,"Abort !");
if(!AutoRequest(G_window,&Request_text,&Yes_text,&No_text,NULL,NULL,600,48))
goto quit;
}
Execute(command,0,0);
/********************************************************************/
command = what gets executed
Task = "Run" in "SubTask" mode, or " " in "OneTask" mode
filename = selected filename, or null string if no files are selected
Use_buf = text in "Use>" field
But_cmd = the format statement that we are talking about
The first "%s" will substitute the "OneTask" or "SubTask" mode.
The second "%s" will substitute a selected filename, or if no
filenames are selected then the "Use>" text field will be substituted.
The third "%s" is only used when you want to capture both a filename
and the "Use>" field.
The fourth "%s" is only used when you need the "Use>" field first then
the selected filename. In this case you will normally have the second
"%s" as "%0.0s" to ignore the first time the filename is referenced.
I have no idea why you might want five "%s", but you can do it.
For filenames with imbedded blanks, don't forget to use quotes around %s,
or better yet rename the file (for example: "MaxiPlan-Program").
For examples see: JoBS.def
---------------------------------------------------------------------
CONCLUSION
This program is what you make of it. You will find methods and
techniques that simplify a wide range of tasks. For example in
downloading Arc files: select the filename.arc, select "Select",
remove .arc in "Use>", select "MakeDir", select "Rename", select
the new directory name to make it current, select the arc file,
and select the "UnArc" gadget. Yes, this sequence can be written
as an AmigaDOS script, but for ad-hoc work and flexible user
definable commands, I think JoBS beats straight CLI and WB.
After many months developing this program, I use it from only
one (customized) workbench disk to run all my Amiga applications.
I don't LoadWB if I can help it, and delete #?.info to save disk$.
JoBS-5 version will be even better!
Please write to me if you have any questions, new user command
definitions or ideas for enhancements. Gratuities are always
appreciated.
John Sawaya
18 Rocky Glen Road
Oxford, PA 19363